X variables

The values of the physical controls, WIFI status/controls, and Safety status of the X Devices are available through the System Variables protocol.

Protocol Editor Settings

Path: ProjectView> Protocols

  1. Click + and select System Variables: the System Variables dialog is displayed.
  1. Select the device model from the PLCModels list.

Tag Editor Settings

Path: ProjectView> Config > double-click Tags

  1. To add a tag, click +: a new line is added.
  2. Select System Variables from the Driver list: tag definition dialog is displayed.

 

The following tables highlight which variables are available in the different models.

 

Memory Type Description Data type
Battery

Value indicating the battery charge percentage (Range: 0..100%).

unsignedByte

Read Only

Battery raw

Value indicating the voltage measured at the battery in hundredths of a Volt

unsignedShort

Read Only

Vibration

Write 1 to start vibrating, write 0 to stop vibrating. If the "vibration Timeout" is greater than 0 when the timeout expired the vibration stops by itself, and the value is reset to 0

boolean

Read Write

Vibration Timeout

Vibration timeout in tenths of a second (Range: 0-600). If 0, the vibration stops only by writing 0 inside the Vibration variable.

unsignedShort

Read Write

Memory Type Description Data type
Temperature

Internal temperature in tenths of a degree °C

short

Read Only

Digital Output

The base contains 4 LEDs that can be driven by 4 digital outputs.

  • 0 = OFF
  • 1 = ON
boolean[4]
Potentiometer

Value of physical potentiometer (Range: 0-255).

Offset property identifies the potentiometer:

  • 1 = right potentiometer
  • 2 = left potentiometer

unsignedShort

Read Only

Proximity Sensor

The proximity sensor is able to detect the presence of an object in the immediate vicinity of the device.

  • 0 = No object detected in the immediate vicinity of the device.
  • 1 = An object has been detected in the immediate vicinity of the device.

integer

Read Only

Light Sensor Luminance in lux.

integer

Read Only

Accelerometer Axes

Measure the acceleration (static + dynamic) on the three x, y and z axes. Unit is g, precision is 1/1000 g

x = float with offset 0 or float [0]
y = float with offset 1 or float [1]
z = float with offset 2 or float [2]

float
float[8]

Read Only

Accelerometer Angle

Angles in degree between axes. These values are calculated internally from the values of the accelerometer axes.

x^y = float with offset 0 or float [0]
x^z = float with offset 1 or float [1]
y^z = float with offset 2 or float [2]

float
float[8]

Read Only

Wheel position

Wheel counters (Range: 0-32767).

unsignedShort

Read Only

Memory Type Description Data type
Safety pairing lamp

Status of the pairing lamp (0=OFF, 1=ON)

boolean

Read Only

Safety Input

0=Unparing, 1=Paring

boolean

Read Only

Safety version Version of the safety module

string[6]

Read Only

Safety Emergency

Status of the Emergency Stop button.

  • 0 = button released
  • 1 = button pressed

boolean

Read Only

Safety Selector Value of physical safety selector (Range: 0-15).

unsignedByte

Read Only

Safety Enabling

Status of the Enabling button.

  • 0 = button released
  • 1 = button pressed

boolean

Read Only

Safety_Coupled

Status of the Safety module.

  • 0 = Decoupled
  • 1 = Coupled

boolean

Read Only

Safety State

Status of internal safety module (refer to X Devices User Manual for further details).

  • 0 = IDLE
  • 1 = RUN
  • 2 = SAFE
  • 3 = SAFE_P

unsignedByte

Read Only

Memory Type Description Data type
Country code Code of country where device is operating. WLAN regulatory requirement (System Settings/Localisation)

string[8]

Read Only

WIFI_Enable 0=Disabled, 1=Enabled

boolean

Read Write

WIFI_Mode 0=Station, 1=Access Point

boolean

Read Write

WIFI_SSID Network Name

string[32]

Read Write

WIFI_Channel

1/11 Channels

Used when WIFI_Mode=1 (Access Point)

integer

Read Write

WIFI_Security 0=NONE, 1=WPA-PSK

integer

Read Write

WIFI_Password

Network Password

Used when WIFI_Security is enabled

string[63]

Write Only

WIFI_Apply

0=IDLE, 1=APPLY, 2=CANCEL

Values entered inside the WiFi configuration variables (WIFI_Mode, WIFI_SSID, WIFI_Channel, WIFI_Security, WIFI_Password) will be applied when the variable WIFI_Apply will be set to 1, then the variable will reset to 0 after applying the values. When the WIFI_Apply will be set to 2, the WiFi configuration parameters will be restored with the active values.

integer

Read Write

WIFI_State 0 = Not Connected, 1 = Connecting, 2 = Connected, -1 = Error

integer

Read Only

WIFI_Signal Range: 0..100%

integer

Read Only

WIFI_WPS

0=Idle, 1=Active (Return 0 after 2 minute)

When set to 1, the HMI device start the password exchange procedure. When the procedure end (passwords exchanged successfully or after two minutes), the variable will return to 0.

boolean

Read Write

WIFI_List

List of available WiFi networks

Used when WIFI_Mode=0 (Station)

string[200]

Read Only

WIFI_List_Update

0=Idle, 1=Searching (Return 0 after update)

Command to search the available WiFi networks and fill the WIFI_List. Search start when the value is triggered to 1, when done the value will be restored to 0.

boolean

Read Write

WIFI_Error_Code

Return an error code if the parameters provided with the WIFI_Apply command are out of range.

0 = No Error

-11000 = Bad WIFI_Mode

-11011 = Bad WIFI_SSID

-11020 = Bad WIFI_Security

-11030 = Bad WIFI_Password

-11040 = Bad WIFI_Chane

integer

Read Only

WIFI_Number_of_Connected_Stations

Number of connected client devices.

Used when WIFI_Mode=1 (Access Point)

integer

Read Only

UID

Base Station UID

string [20]

Read Only